﻿Namespace DateTimeOperations
    Public Module DateTimeComparison
        Public Function FirstDate(ByVal Date1 As Date, ByVal Date2 As Date) As Date
            If DateTime.Compare(Date1, Date2) >= 1 Then
                Return Date2
            Else
                Return Date1
            End If
        End Function
        Public Function LastDate(ByVal Date1 As Date, ByVal Date2 As Date) As Date
            If DateTime.Compare(Date1, Date2) >= 1 Then
                Return Date1
            Else
                Return Date2
            End If
        End Function
    End Module
End Namespace